﻿@model Orion.Models.NewsArticle
@{
    ViewBag.Title = "IRIS - Innranet - Ný frétt";
    Layout = "~/Views/Shared/_WorkLayout.cshtml";
}

<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/tiny_mce/tiny_mce.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/TinyMCE.js")" type="text/javascript"></script>

<section id="main_content_wrapper">

@{ Html.EnableClientValidation(); }
@using (Html.BeginForm("CreateNews", "WorkNewsArticle", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
     @Html.ValidationSummary(true)
    <fieldset>
        <legend>Skrifa nýja frétt</legend>
        <ol>
            <li>
                @Html.LabelFor(model => model.Title, "Titill")
                @Html.EditorFor(model => model.Title)
                @Html.ValidationMessageFor(model => model.Title)
            </li>
            <li>
                @Html.LabelFor(model => model.TextBody, "Meginmál")
                @Html.TextAreaFor(model => model.TextBody)
                @Html.ValidationMessageFor(model => model.TextBody)
            </li>
            <li>
                <label for="file">Mynd</label>
                <input type="file" name="file" id="file" />
            </li>
            <li>
                <label for="Valid">Sýnileg</label>
		        <select id="Valid" name="Valid">            
                    <option value="true" >Já</option>
                    <option value="false">Nei</option>
		        </select>
            </li>

            
            @Html.HiddenFor(model => model.ContentType)
            @Html.HiddenFor(model => model.Author)

            <input type="submit" value="Birta" />
        </ol>
    </fieldset>
}

</section>